#pragma once
#ifndef QLISTWIDGETENHANCEDITEM_H
#define QLISTWIDGETENHANCEDITEM_H
#include <QListWidgetItem>

template <typename T>
class QListWidgetEnhancedItem : public QListWidgetItem {
public:
    QListWidgetEnhancedItem(QListWidget * parent = 0, int type = Type) : QListWidgetItem(parent, type) {}
    QListWidgetEnhancedItem(const QString & text, QListWidget * parent = 0, int type = Type) : QListWidgetItem(text, parent, type){}
    QListWidgetEnhancedItem(const QIcon & icon, const QString & text, QListWidget * parent = 0, int type = Type) :
        QListWidgetItem (icon, text, parent, type){}
    QListWidgetEnhancedItem(const QListWidgetItem & other) : QListWidgetItem (other){}
    T & get_value() { return value; }
    void set_value(T val) { value = val; }
protected:
    T value;
};


#endif // QLISTWIDGETENHANCEDITEM_H
